package com.sc.VenusQueryBeta.model.account.zhuanma;

import com.hengjun.kingstar.sdk.base.BaseModel;
import com.hengjun.kingstar.sdk.helper.RetrofitCreateHelper;
import com.hengjun.kingstar.sdk.helper.RxHelper;
import com.sc.VenusQueryBeta.api.Host;
import com.sc.VenusQueryBeta.api.account.AccountApi;
import com.sc.VenusQueryBeta.contract.account.zhuanma.ZhuanMa01Contract;
import com.sc.VenusQueryBeta.model.bean.account.CurrencyListBean;
import com.sc.VenusQueryBeta.model.bean.account.zhuanma.ZhuanMaList1;

import io.reactivex.Observable;

/**
 * Created by Administrator on 18/10/2018.
 *
 */

public class ZhuanMa01Model extends BaseModel implements ZhuanMa01Contract.IZhuanMa01Model {
//    @Override
//    public Observable<ZhuanMaList1> getZhuanMa01(String serverAddress, String projectName, int serverPort, int clientindex, int start, int limit, String clientAppmsgnum,String roomonth, String roomyear,int chiptype) {
//        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").
//                queryZhuanma01(roomonth,roomyear,start,limit,clientindex,clientAppmsgnum,chiptype).compose(RxHelper.<ZhuanMaList1>rxSchedulerHelper());
//    }

    public static ZhuanMa01Model newInstance() {
        return new ZhuanMa01Model();
    }

    @Override
    public Observable<CurrencyListBean> queryCurrencyList(String serverAddress, String projectName, int serverPort) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").queryCurrencyList().compose(RxHelper.<CurrencyListBean>rxSchedulerHelper());
    }



    @Override
    public Observable<ZhuanMaList1> getZhuanMa01(String serverAddress, String projectName, int serverPort, int clientindex, int start, int limit, String clientAppmsgnum, String roomonth, String roomyear,String currencynameCN) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").
                queryZhuanma01(roomonth,roomyear,start,limit,clientindex,clientAppmsgnum, currencynameCN).compose(RxHelper.<ZhuanMaList1>rxSchedulerHelper());
    }
}
